# 判断构建方式
macro(build_type_conf)
    if(CMAKE_BUILD_TYPE MATCHES "Debug")
        message(STATUS "Configuring for Debug build")
        # 设置Debug编译选项

    elseif(CMAKE_BUILD_TYPE MATCHES "Release")
        message(STATUS "Configuring for Release build")
        # 设置Release编译选项
        
    elseif(NOT CMAKE_BUILD_TYPE)
        print(STATUS "Configuring for Release build")
        set(CMAKE_BUILD_TYPE "Release")
    endif()
endmacro(build_type_conf)


function(CHECK_BUILD_TYPE reply)
    if(NOT CMAKE_BUILD_TYPE)
        reply(${reply} "NULL ERROR")
    elseif(CMAKE_BUILD_TYPE MATCHES "Debug")
        reply(${reply} OFF)
    elseif(CMAKE_BUILD_TYPE MATCHES "Release")
        reply(${reply} ON)
    endif()
endfunction(CHECK_BUILD_TYPE)


